package com.yydream.common.constant;

public enum HttpStatus {
    SUCCESS(200, "操作成功"),
    SYSTEM_ERROR(10001, "系统异常，请稍后重试"),
    PARAM_ERROR(10002, "参数格式校验失败"),
    ALREADY_EXIST(10003, "数据已存在"),
    DATA_NOT_EXIST(10004, "数据不存在"),
    NO_PERMISSION(10005, "没有权限访问"),
    INVALID_TOKEN(10006, "您还未登录或登录失效，请重新登录！"),
    USER_STATUS_ERROR(10007, "用户状态异常"),
    FORM_REPEAT_SUBMIT(10008, "请勿重复提交"),
    NO_FREQUENTLY_REQUEST(10009, "请勿频繁请求"),
    USER_EXIST(10010, "用户已存在"),
    TIMEOUT_CAPTCHA(10011, "验证码不存在或已过期"),
    PUBLIC_KEY_EXPIRE(10012, "请重新获取公钥");

    private Integer code;
    private String msg;

    HttpStatus(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
